<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <link rel="apple-touch-icon-precomposed" sizes="57x57" href="${request.contextPath}/resources/image/desktop_logo-57.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="${request.contextPath}/resources/image/desktop_logo-72.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="${request.contextPath}/resources/image/desktop_logo-114.png">
    <title>100%喜帖</title>
    <link rel="stylesheet" href="${request.contextPath}/resources/css/bootstrap.min.css">
    <link rel="stylesheet" href="${request.contextPath}/resources/css/style.css">
</head>
<body>

<div class="container-fluid">
 	<div align="center">
			<br /> <br /> <br /> <input type="button" ID="submit" value="立即支付" onclick="callpay()"
				style="width: 210px; height: 50px; border-radius: 15px; background-color: #00CD00; border: 0px #FE6714 solid; cursor: pointer; color: white; font-size: 16px;"
			/>
	</div>
</div>

<script src="${request.contextPath}/resources/js/jquery-2.1.4.min.js"></script>
<script src="${request.contextPath}/resources/js/bootstrap.min.js"></script>
<script>
		//调用微信JS api 支付
	wx.config({
	    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
	    appId: 'wx744a5f3859265b34', // 必填，公众号的唯一标识
	    timestamp: <%=timestamp%>, // 必填，生成签名的时间戳
	    nonceStr: '<%=nonceStr%>', // 必填，生成签名的随机串
	    signature: '<%=signature%>', // 必填，签名，见附录1
		jsApiList : [ 'chooseWXPay' ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
	});

	function callpay() {
		wx.chooseWXPay({
			timestamp: <%=wxJsApiParam.GetValue("timeStamp")%>, 
		    nonceStr: '<%=wxJsApiParam.GetValue("nonceStr")%>',
		    package: '<%=wxJsApiParam.GetValue("package")%>', 
		    signType : '<%=wxJsApiParam.GetValue("signType")%>',
		    paySign: '<%=wxJsApiParam.GetValue("paySign")%>',
		    success: function(res) {
		    	alert('支付成功');
		    }
		});
	}
</script>
</body>
</html>